Network virtualization entails creating logical, virtual networks that are decoupled from the underlying network hardware to ensure the network can better integrate with and support increasingly virtual environments. In recent years, enterprises have been adopting network virtualization at a growing rate to take advantage of the flexibility of software-based compute.
In some virtualized networks, network administrators can define logical forwarding elements (e.g., logical switches, logical routers) from one or more “physical” forwarding elements. A logical forwarding element is defined to create a logical division of the network, in which several related network hosts can communicate with one another. The network hosts are related to one another because, typically, they belong to a single entity, such as a user, customer, or tenant.
One of the challenges in implementing such a logical forwarding element involves retrieving its statistics (e.g., packet count, byte count). This can be a challenge because the logical forwarding element is a logical construct that does not exist in the real world. In the worst case scenario, the logical ports of the logical forwarding element can be completed distributed amongst multiple physical forwarding elements. To retrieve logical port stats, a network administrator has to figure out which physical ports correspond to which logical ports. The network administrator then has to individually query one or more storages to retrieve the physical ports' statistics. As such, gathering statistics relating to the logical forwarding element can be a time consuming endeavor.
In addition to logical forwarding element stats, the network administrator may want to retrieve other statistics. For instance, the network administrator may want to know the total statistics for a machine (e.g., virtual machine) or a group of machines. Such total statistics are useful because they can be used to determine the amount of traffic one or more machines of a customer is generating and possibly charge overages based on the amount of traffic.